package com.wuzhipeng.xuechengcontent.controller;


import com.wuzhipeng.xuechengcontent.dto.CourseCategoryTreeDto;
import com.wuzhipeng.xuechengcontent.service.ICourseCategoryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 数据字典 前端控制器
 * </p>
 *
 * @author wuzhipeng
 *
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/content")
@Tag(name = "课程分类管理", description = "课程分类管理")
public class CourseCategoryController {


    private final ICourseCategoryService courseCategoryService;


    /**
     * 查询课程分类树节点
     * @return Lis<CourseCategoryTreeDto> 课程分类树节点
     */
    @Operation(summary = "查询课程分类树节点", description = "查询课程分类树节点")
    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryTreeDto> queryTreeNodes() {
        return courseCategoryService.queryTreeNodes("1");
    }
}